package com.koron.system.langfield;

import com.koron.bean.base.Response;
import com.koron.common.core.business.langfield.bean.LangFieldBean;
import com.koron.common.core.business.langfield.service.LangFieldService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.koron.ebs.mybatis.ADOConnection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/LangField")
@Api(tags = "系统管理-配置管理-多语言字段")
public class LangFieldController {

    @Autowired
    private LangFieldService langfieldservice;

    @PostMapping("addLangFiel")
    @ApiOperation(value = "新增多语言字段")
    public Response addLangFiel(@RequestBody LangFieldBean langfieldbean) {
        return ADOConnection.runTask(langfieldservice,"addLangFiel",Response.class, langfieldbean);
    }

    @GetMapping("removeLangFiel")
    @ApiOperation(value = "删除")
    public Response removeLangFiel(@RequestParam("id") String id) {
        return ADOConnection.runTask(langfieldservice,"removeLangFiel",Response.class, id);
    }

    @PostMapping("updateLangFiel")
    @ApiOperation(value = "修改")
    public Response updateLangFiel(@RequestBody LangFieldBean langfieldbean) {
        return ADOConnection.runTask(langfieldservice,"updateLangFiel",Response.class, langfieldbean);
    }

    @GetMapping("queryById")
    @ApiOperation(value = "详细")
    public Response queryById(@RequestParam("id") String id) {
        return ADOConnection.runTask(langfieldservice,"queryById",Response.class, id);
    }
}
